import Abstract from '../views/common/abstract.vue';
const releRoles = r => require.ensure([], () => r(require('../views/releRoles.vue')), 'chunkname1')
// const releGroup = r => require.ensure([], () => r(require('../views/releGroup.vue')), 'chunkname2')
// import releGroup from '../views/releGroup.vue'
import users from '../views/users.vue'

export default [{
  path: '/',
  name: '首页',
  component: (resolve) => require(['../views/index.vue'], resolve),
  children: [  
    {
      path:'/website',
      name:'网站运营',
      des:'authlist',//判断是否展开导航
      
      meta: {
        // name: '权限管理列表项'
        icon: '&#xe62e;',
        icon_img:require("../assets/img/key.png"),

      },
      // component: (resolve) => require(['../views/index.vue'], resolve),
      component:Abstract,

      children:[
       {
          path: 'users',
          name: '平台-用户管理',
          meta: {
            name: '用户管理',
            icon_img:'',
            des:'users',//判断是否选中导航

          },
          // component: (resolve) => require(['../views/users.vue'], resolve),
          component:users,
          children:[
            {
              path: 'relegroup',
              name: '关联分组',
              meta: {
                icon_img:''
              },
              // component:releGroup
            },
              {
              path: 'releroles',
              name: '关联角色',
              meta: {
                icon_img:''
              },
              component:(resolve) => require(['../views/releRoles.vue'], resolve)
            }
          ]
        },
        {
          path: 'roles',
          name: '平台-角色管理',
          meta: {
            name: '角色管理',
            icon_img:'',
            des:'roles',          

          },
          component: (resolve) => require(['../views/roles.vue'], resolve),
           children:[
            {
              path: 'relegroup',
              name: '关联分组',
              meta: {
                icon_img:''
              },
              // component:releGroup
            },
            {
              path: 'addauthority',
              name: '添加权限',
              meta: {
                icon_img:''
              },
              component:(resolve) => require(['../views/addAuthority.vue'], resolve)
            },
           {
              path: 'releusers',
              name: '关联用户',
              meta: {
                icon_img:''
              },
              component:(resolve) => require(['../views/releusers.vue'], resolve)
            }
          ]
        },
        {
          path: 'authority',
          name: '平台-权限管理',
          meta: {
            name: '权限管理',
            icon_img:'',
            des:'authority',

          },
          component: (resolve) => require(['../views/authority.vue'], resolve),
          children:[
            {
              path: 'releroles',
              name: '关联角色',
              meta: {
               icon_img:''
              },
              component:(resolve) => require(['../views/releRoles.vue'], resolve),              
              hidden:true
            }
          ]
        },
        {
          path: 'usergroup',
          name: '平台-组管理',
          meta: {
            name: '组管理',
            icon_img:'',
            des:'usergroup',

          },
          component: (resolve) => require(['../views/userGroup.vue'], resolve),
            children:[
            {
              path: 'releroles',
              name: '关联角色',
              meta: {
               icon_img:''
              },
              component:releRoles,
              hidden:true
            },
             {
              path: 'releusers',
              name: '关联用户',
              meta: {
                icon_img:''
              },
              component:(resolve) => require(['../views/releusers.vue'], resolve)
            }
          ]
        },
      ]
    },
    {
      path:'/authmenu',
      name:'资源管理',
      des:'authmenu',//判断是否展开导航
      
      meta: {
        // name: '权限管理列表项'
        icon: '&#xe62e;',
        icon_img:require("../assets/img/key.png"),

      },
      children:[
        {
          path: 'menu',
          name: '菜单管理',
          meta: {
            name: '菜单管理',
            icon_img:'',
            des:'menu',//判断是否选中导航

          },
          // component: (resolve) => require(['../views/users.vue'], resolve),
          component:users,
        }
      ]
    }
  ]
}];